package com.mtsmda.chapter5.exeptionEx;

public class AssertEx {

	private int num;

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public static void main(String[] args) {
		AssertEx assertEx = new AssertEx();
		assertEx.methodA(-1);
		System.out.println(assertEx.getNum());
		
		
		
	}
	
	
	void methodA(int num){
		assert(num > 0)/*: "error"*/;
		setNum(getNum() + num);
	}
}